﻿using System;
using System.Collections.Generic;
using System.Text;

namespace designmodule.constructionmodule.AbstractFactory.NormalAbstractFactory
{
    static class Program
    {
        static void main()
        {
            //抽象方法将横向水平的 工程分离出来，，每一个垂直的部分都可以水平分生产方法
            //接口编程，可以灵活扩展
            //缺点太多接口实现，做的东西比较多，需要用简单工厂配合
            var user = new User();
            var department = new Department();

            IFactory factory=new MySqlFactory();
            IUser iuser = factory.CreateUser();
            iuser.Insert(user);
            iuser.GetUser(1);

            IDepartment iDepartment = factory.CreateDepartment();
            iDepartment.Insert(department);
            iDepartment.GetDepartment(1);



        }

    }
}
